package com.snail.cloud.model;

/**
 * @author MR.LHL
 * @date 2024/2/27
 */
public enum ResultCodeEnum {
    SUCCESS(0, "操作成功"),
    FAIL(1, "操作失败"),
    USERNAME_PASSWORD_ERROR(10000, "用户名或密码错误"),
    INVALID_OLD_PASSWORD(10001, "无效的旧密码"),
    USERNAME_EXISTS(10002, "用户名已经存在"),
    PHONE_EXISTS(10003, "手机号已经存在"),
    USERNAME_NOT_EXISTS(10004, "用户名未注冊"),
    PHONE_NOT_EXISTS(10005, "手机号未注冊"),
    CODE_INVALID(10006, "验证码无效"),
    SMD_SEND_FAILED(10007, "发送短信失败"),
    TOKEN_INVALID(11000,"token无效"),

    BAD_REQUEST(4000,"请求参数错误");

    /**
     * 自定义状态码
     **/
    private final int code;
    /**
     * 自定义描述
     **/
    private final String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
    }
